1. Field of the Invention
The present invention relates to a position detecting apparatus and a position detecting method each of which uses a magneto-resistive (MR) element, an optical sensor, and the like, and further an optical apparatus that uses these.
2. Description of Related Art
Conventionally, a position detecting apparatus that uses a magnetoresistive element (hereinafter, this is called an MR element) detects a position by selecting a phase having a signal component with excellent linearity among sinusoidal signal components from the MR element with a plurality of phases, and by performing the calculation of interpolating the signal component.
Here, in general, outputs with a plurality of phases from the MR element are different in their amplitude and levels of their amplitude centers as shown in FIG. 22. Their gains and offsets are adjusted so that the amplitude and the amplitude centers may became in similar levels respectively as shown in FIG. 23 since enough accuracy is not obtained when the outputs are used for position detection as it is.
Gains and offsets of outputs of an MR element vary by assembly errors of the sensor, errors of electric characteristics of circuits, a characteristic change of the sensor due to temperature, and the like in an individual product. It is necessary to adjust the gains and offsets adequately according to these so as to keep the high accuracy of position detection of a lens.
The following means is proposed as a method for performing this adjustment. Namely, a lens that is a measuring object is moved longer than one period of a sine wave output of an MR sensor at the time of power-on or a system reset. At that time, gain and offset adjustment data are obtained from maximum and minimum values of sensor outputs, sampled in a specific period, from an A/D converter.
Then, the gains and offsets are adjusted by processing the sensor output data, fetched from the A/D converter, by using this adjustment data so that the amplitude and amplitude centers may become in similar levels respectively.
Namely, the lens that is a measuring object is moved longer than one period of a sine wave output of the MR sensor. Specifically, let MAX and MIN be the maximum value and minimum value of the MR sensor output respectively, and the gain GAIN and offset OFFET that are the adjustment data are calculated from the following Expressions (1) and (2). Nevertheless, RANGE denotes a dynamic range of the sensor output data after adjustment.                     GAIN        =                  RANGE                      MAX            -            MIN                                              (        1        )                                OFFSET        =                              MAX            +            MIN                    2                                    (        2        )            
An output OUTPUT, whose gain and offset are adjusted, is obtained by applying a correction expression of Expression (3) to the MR sensor output MR from GAIN and OFFSET that are obtained here.OUTPUT=(MR−OFFSET)×GAIN  (3)
Such gain and offset adjustment of an output from an MR sensor is proposed in Japanese Patent Laid-Open No. H06(1994)-105206 (corresponding to U.S. Pat. No. 5,453,684).
Nevertheless, only after the lens moves by one period of a sine wave output of the MR sensor, adjustment data (GAIN and OFFSET) can be obtained in the above-described conventional example. Therefore, as shown in FIG. 24, when the lens is in a position P, the adjustment data are obtained by using a maximum value MAX1 and a minimum value MIN1 in an adjacent period thereof, not by using a maximum value MAX2 and a minimum value MIN2 in a sine wave period where the lens exists currently.
In general, the amplitude of an output signal from an MR sensor varies depending on a lens position in the direction of a measurement axis because of an assembly error of a sensor magnet, and the like. Hence, it may arise that the accuracy of position detection decreases since correct adjustment data in a current position of the lens is not obtained by the above-described method.
In addition, in the above-described conventional example, adjustment data are not updated when the lens repeats long-time moves or stays for a long time in a range within one period or less of a sine wave output of the MR sensor. Hence, it may arise that the accuracy of position detection decreases since a gain fluctuation and/or an offset fluctuation that are caused by a temperature change in the meantime are note adjusted.
Moreover, since a sampling rate becomes low at the time of fetching an MR sensor output into an A/D converter when the moving speed of the lens is fast, it is not possible to surely fetch maximum and minimum values of the sensor output. Therefore, when the lens moves at more than a specific speed, it may arise that the accuracy of position detection decrease since neither the gain adjustment nor the offset adjustment are correctly performed.
Namely, in order to obtain the maximum value MAX and the minimum value MIN in one period of the MR sensor output accurately, it is necessary to surely sample the maximum value and minimum value by moving the lens at sufficiently low speed as shown in FIG. 25. This is because it is not possible to sample the maximum value and minimum value in one period since sampling becomes rough in comparison with the one period as shown in FIG. 26 when the lens moves at high speed.
On the other hand, the position calculation is performed at the time of power-on or a system reset by using predetermined suitable initial data since the maximum value and minimum value in one period of the NR sensor output are uncertain. However, it is not possible to perform accurate position calculation since this initial data is not obtained with the above-described errors being considered.
Here, when the position detection by an MR element is used for the position control of a lens in an optical system, the control of the lens is achieved by servo control of feeding back the result of position detection by the MR element. However, the lens control becomes unstable by the above-described reason since the position calculation is inaccurate at the time of the power-on or system reset. Hence, a phenomenon that the lens moves to a mechanical limit at high speed at a dash arises.
Therefore, since sampling roughens immediately after the power-on or system reset since the moving speed of the lens is too fast, it is not possible to obtain the accurate maximum value and minimum value of the MR sensor output.
Up to now, adjustment data (GAIN and OFFSET) obtained by making the moving speed controllable by performing the control of reciprocating the lens two or more times. Nevertheless, though accurate adjustment data is obtained by this method, extra lens reset time is required because of reciprocating the lens two or more times.